]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/button: Consider touch sequences for ::pressed state
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 18 Mar 2021 17:40:40 +0000 (18:40 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 11 May 2021 16:13:49 +0000 (16:13 +0000)
We do notify on the ::pressed property after touch begin/end and
recording the event sequence, but we do not return the correct value
if the button was triggered via touch.

Consider the event sequence also in the ::pressed getter, so the
button is considered pressed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1774>

src/st/st-button.c

index 1be9de5f09a91442c8b5cdda2391621bf6dcbd10..eae245928a7d8b00e87a801ccbae4dc5a5661667 100644 (file)
@@ -432,7 +432,7 @@ st_button_get_property (GObject    *gobject,
       g_value_set_boolean (value, priv->is_checked);
       break;
     case PROP_PRESSED:
-      g_value_set_boolean (value, priv->pressed != 0);
+      g_value_set_boolean (value, priv->pressed != 0 || priv->press_sequence != NULL);
       break;